package com.shoulei.designpattern.commandPattern;

/**
 * @ClassName:CommandPatterDemo
 * @Descrition:
 * @Author:shoulei
 * @Date:2019/4/14 17:26
 * @Verson:
 */
public class CommandPatterDemo {
    public static void main(String[] args) {
        Stock abcStock = new Stock();
        BuyStock buyStock = new BuyStock(abcStock);
        SellStock sellStock = new SellStock(abcStock);
        Broker broker = new Broker();
        broker.takeOrder(buyStock);
        broker.takeOrder(sellStock);
        broker.placeOrders();
    }
}
